package vn.edu.ute.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="chidoan")
public class ChiDoan {
	@Id
	@Column(name="MaChiDoan",length=30,nullable=false)
	private  String maChiDoan;
	@Column(name="TenChiDoan",length=30,nullable=false)
	private String tenChiDoan;
	@ManyToOne
	@JoinColumn(name="MaDoanKhoa")
	private DoanKhoa doanKhoa;
	public ChiDoan(String maChiDoan, String tenChiDoan, DoanKhoa doanKhoa) {
		super();
		this.maChiDoan = maChiDoan;
		this.tenChiDoan = tenChiDoan;
		this.doanKhoa = doanKhoa;
	}
	public ChiDoan() {
		super();
	}
	public String getMaChiDoan() {
		return maChiDoan;
	}
	public void setMaChiDoan(String maChiDoan) {
		this.maChiDoan = maChiDoan;
	}
	public String getTenChiDoan() {
		return tenChiDoan;
	}
	public void setTenChiDoan(String tenChiDoan) {
		this.tenChiDoan = tenChiDoan;
	}
	public DoanKhoa getDoanKhoa() {
		return doanKhoa;
	}
	public void setDoanKhoa(DoanKhoa doanKhoa) {
		this.doanKhoa = doanKhoa;
	}
	
}
